package com.lynn.lib_base.http.interceptor

import com.orhanobut.logger.Logger
import okhttp3.Interceptor
import okhttp3.Response

/**
 * @description: 响应（返回）拦截器
 * @author: bailing
 * @datetime: 2025/5/27 14:30
 **/
class ResponseInterceptor : Interceptor {

    override fun intercept(chain: Interceptor.Chain): Response {
        val requestTime = System.currentTimeMillis()
        val response = chain.proceed(chain.request())
        val responseTime = System.currentTimeMillis()
        Logger.d("requestSpendTime= %s ms", responseTime - requestTime)
        return response
    }
}